<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>对象展开</title>
  </head>
  <body>
    <!-- 
        Rest参数与spread扩展运算符在ES9中运用
     -->
    <script>
      function connect({ name, ...rest }) {
        console.log(name);
        console.log(rest);
      }

      connect({ name: "小徐", age: 28, sex: "男" });
    </script>
  </body>
</html>
